using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using Common.Utilities.Dispatcher;

namespace Workflows.Components.Reports
{
    [Serializable]
    public class ReportBuilderInstruction : InstructionBase
    {
        private ReportDataSet _DataSource;
        private List<TableReportItem> _Tables;
        private List<ChartReportItem> _Charts;
        private List<MatrixReportItem> _Matrixs;
        private List<QueryParameterItem> _QueryItems;

        public ReportBuilderInstruction()
            : base(Guid.Empty, Guid.Empty)
        {
            this._DataSource=new ReportDataSet();
            this._Tables=new List<TableReportItem>();
            this._Charts=new List<ChartReportItem>();
            this._Matrixs=new List<MatrixReportItem>();
            this._QueryItems=new List<QueryParameterItem>();
        }

        public ReportBuilderInstruction(Guid componentID, Guid jobTicketID,
            ReportDataSet dataSrc,
            List<TableReportItem> tables,
            List<ChartReportItem> charts,
            List<MatrixReportItem> matrixs,
            List<QueryParameterItem> queryItems)
            :base(componentID,jobTicketID)
        {
            this._DataSource = dataSrc;
            this._Tables = tables;
            this._Charts = charts;
            this._Matrixs = matrixs;
            this._QueryItems = queryItems;
        }

        #region props
        public ReportDataSet DataSource
        {
            get { return _DataSource; }
            set { _DataSource = value; }
        }

        public List<TableReportItem> Tables
        {
            get { return _Tables; }
            set { _Tables = value; }
        }

        public List<ChartReportItem> Charts
        {
            get { return _Charts; }
            set { _Charts = value; }
        }

        public List<MatrixReportItem> Matrixs
        {
            get { return _Matrixs; }
            set { _Matrixs = value; }
        }

        public List<QueryParameterItem> QueryItems
        {
            get { return _QueryItems; }
            set { _QueryItems = value; }
        }
        #endregion

        public override XmlNode Serialize(ref XmlDocument xDoc, ref XmlNode parentNode)
        {
            throw new NotImplementedException();
        }

        public override InstructionBase Instantiate(XmlNode xNode)
        {
            throw new NotImplementedException();
        }
    }
}
